package com.example.demo.service.impl;

import com.example.demo.entity.WorkOrder;
import com.example.demo.mapper.WorkOrderMapper;
import com.example.demo.service.IWorkOrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author liyuanlin
 * @since 2024-08-15
 */
@Service
public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder> implements IWorkOrderService {

    // 查询7月每天的工单总量、超期率
    @Override
    public List<Map<String, Object>> getDailyOrderStatsByMonth(String month) {
        return this.baseMapper.selectDailyOrderStatsByMonth(month);
    }

    //查询7月每个部门的工单总量、超期率
    public List<Map<String, Object>> getDeptOrderStatsByMonth(String month) {
        return this.baseMapper.selectDeptOrderStatsByMonth(month);
    }

    //查询7月每个工单类型的工单总量、超期率
    public List<Map<String, Object>> getTypeOrderStatsByMonth(String month) {
        return this.baseMapper.selectTypeOrderStatsByMonth(month);
    }


}
